<?php


class TestTbfInput extends TbfTestCase{
    function testGetLanguage(){
        $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'zh-TW,zh;q=0.8,zh-CN;q=0.6,en;q=0.4';
        $this->assertSame(array('zh_tw','zh','zh_cn','en'),TbfInput::getLanguageList());

        $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en,zh-CN;q=0.8,zh;q=0.6,zh-TW;q=0.4';
        $this->assertSame(array('en','zh_cn','zh','zh_tw'),TbfInput::getLanguageList());
    }
} 
